import unittest


class TestFile2(unittest.TestCase):

    # 开始仅前一次
    @classmethod
    def setUpClass(cls) -> None:
        print("t2 prepare ---------------\t\n")

    # 结束后仅一次
    @classmethod
    def tearDownClass(cls) -> None:
        print("t2 end ---------------\t\n")

    def __int__(self):
        pass

    # 单个测试用例环境准备
    def setUp(self) -> None:
        print("准备t2测试资源...")

    # 单个测试结束回调
    def tearDown(self) -> None:
        print("清理t2测试资源...\n")
        pass

    def test_method3(self):
        aa = 'test_method'
        print('测试 test_method3')
        self.assertEqual('test_method', aa)
        pass

    def test_method4(self):
        aa = 'test_method'
        print('测试 test_method4')
        self.assertEqual('test_method', aa)
        pass


if __name__ == '__main__':
    unittest.main(verbosity=2)
